// commands.c

#include "types.h"

int ExecuteCommand( char *input )
{
   if        ( !strncmp( input, "stats", 5 ) )
   {
      SurvivorsPrintStats( );
      return 1;
   } else if ( !strncmp( input, "look", 4 ) )
   {
      LocationLook( );
      return 1;
   } 
   else if ( !strncmp( input, "help", 4 ) )
   {
      HelpActivity( );
   }
   else if ( !strncmp( input, "scavange", 8 ) )
   {
      ScavangeActivity( );
      AdvanceTime( );
   }
   else if ( !strncmp( input, "fortify", 7 ) )
   {
      FortifyActivity( );
      AdvanceTime( );
   }
   else if ( !strncmp( input, "sleep", 5 ) )
   {
      SleepActivity( );
      AdvanceTime( );
   }
   else if ( !strncmp( input, "move", 4 ) )
   {
      MoveActivity( );
      AdvanceTime( );
   }
   else if ( !strncmp( input, "exit", 4 ) )
   {
      exit( 0 );
   }
   else
   {
      printf("Unrecognized command, try help.\n");
   }

   return 0;
}

